1. Field of the Invention
The present invention relates to a numerical controller with an auxiliary command execution function.
2. Description of the Related Art
A machining program consists of an axis movement command for operating an axis and an auxiliary command other than the axis movement command. A numerical controller reads the auxiliary command from the machining program and then transmits a command associated with the auxiliary command. The numerical controller then receives a completion signal associated with the command and thereby executes a subsequent command. This means that the numerical controller needs to wait for the subsequent command before receiving the completion signal, causing the machining program to take longer to execute the commands.
On the contrary, there has been known a technology that previously registers auxiliary commands indicating the unnecessity of receiving completion signals associated thereto and, when active commands are these auxiliary commands indicating the unnecessity of receiving completion signals associated thereto, sequentially executes subsequent commands without waiting to receive the completion signals. Several related prior arts are described next.
(First Example of Prior Art)
Japanese Patent Application Laid-Open No. 62-189506 discloses a numerical controller of a machine tool for controlling an external device. This numerical controller reads a machining program, determines the presence of a M-function in the program by using a determination circuit, outputs a M-function signal to the external device, and receives a M-function completion signal from the external device. This numerical controller further stores in a nonvolatile memory a M-function number requiring no M-function completion signal, compares a M-function number requiring no M-function completion signal with the M-function number stored in the nonvolatile memory, and advances to a subsequent machining program without the M-function completion signal.
A brief summary of outputting the M-function signal in the abovementioned numerical controller 21 is now described using FIG. 3.
A machining program storage unit 22 stores a large number of machining programs required to perform machining, the machining programs being stored therein in advance by an operator. A reader 23 reads the machining programs stored in the machining program storage unit 22 and sequentially executes program commands. A determination part 24 determines whether commands in the machining programs read by the reader 23 are auxiliary commands or not. When the determination part 24 confirms the presence of auxiliary commands in the machining programs, an auxiliary command transmitter 25 transmits signals requiring the execution of auxiliary functions associated with the auxiliary commands. A completion signal receiver 26 receives completion signals indicating the completion of the execution of the auxiliary functions (but does not execute subsequent commands before receiving the completion signals).
A process in which the auxiliary commands are executed by the numerical controller 21 is now described using a flowchart shown in FIG. 4.
The program commands in the machining programs are read (step SB01), and it is determined whether the read program commands are the auxiliary commands or not (step SB02). When the read program commands are the auxiliary commands, signals requiring the execution of auxiliary functions associated with the auxiliary commands are transmitted (step SB03). After the execution of the auxiliary functions, it is determined whether completion signals indicating the completion of the auxiliary functions are received or not (step SB04). When the completion signals are received, then it is determined whether the machining programs are ended or not (step SB05). When the machining programs are not yet ended, step SB01 is performed again to read the program commands.
(Second Example of Prior Art)
The numerical controller disclosed in Japanese Patent Application Laid-Open No. 2007-310499 has a machining program analysis processing part for analyzing a machining program and causing a ladder processing part to execute a predetermined command of the program, the ladder processing part for executing a ladder sequence corresponding to a command from the machining program analysis processing part, and a mechanical control processing part for performing predetermined control on a control target connected to the numerical controller, based on an analysis result on the machining program that is obtained from the machining program analysis processing part and a ladder sequence execution result obtained from the ladder processing part.
The ladder processing part has a temporary process end signal output function that, once receiving from the machining program analysis processing part a M code that gives a command to perform an auxiliary process for performing machining, transmits a temporary process end signal indicating that the processing of the received M code has ended in a pseudo manner, and a primary process end signal output function that transmits a primary process end signal indicating that the processing of the received M code has actually ended.
Once receiving the temporary process end signal from the ladder processing part, the machining program analysis processing part proceeds to a subsequent block before reading a M code process completion waiting command for receiving the primary process end signal on the M code of the machining program, and does not execute the processing on the subsequent block until the primary process end signal is received, when the primary process end signal is not received before the M code process completion waiting command is read.
(Third Example of Prior Art)
The numerical controller disclosed in Japanese Patent Application Laid-Open No. 2011-39701 has a machining program storage unit, an auxiliary command completion waiting table storage unit, a machining program execution part, a completion signal receiver, a completion waiting determination part, and a command execution part.
The machining program storage unit is for storing a machining program in which is described a command that includes a movement command as a command for axially moving a tool of a machine tool and an auxiliary command as a command for assisting the axial movement. The auxiliary command completion waiting table storage unit is for storing an auxiliary command completion waiting table having an association between the auxiliary command and a completion waiting condition obtained by defining information on the auxiliary command as a condition for waiting to receive an operation completion signal corresponding to the auxiliary command from the machine tool. The machining program execution unit executes the command in an order described in the machining program stored in the machining program storage unit, by accepting an execution request of the machining program. The completion signal receiver receives the operation completion signal. The completion waiting determination part detects the command from the machining program to be executed. When the auxiliary command is detected as the command, the completion waiting determination part determines whether a result of execution based on a command subsequent to the detected auxiliary command conforms to the completion waiting condition corresponding to the detected auxiliary command, the condition being stored in the auxiliary command completion waiting table. When the execution result does not conform to the completion waiting condition corresponding to the auxiliary command requesting the execution, the command execution part requests to execute subsequent commands sequentially in the machining program. When the execution result conforms to the completion waiting condition corresponding to the auxiliary command requesting the execution, the command execution part waits to receive the operation completion signal without requesting to execute subsequent commands sequentially in the machining program.
A brief summary of the abovementioned numerical controller 21 is described using FIG. 5.
The numerical controller 21 controls an external device 19. A large number of machining programs required to perform machining are stored in the machining program storage unit 22 in advance by an operator. Auxiliary commands indicating the unnecessity of waiting to receive completion signals (indicating the unnecessity of receiving completion signals) and conditions for ending the monitoring of the completion signal, are stored in an auxiliary command storage unit 27 in advance by the operator. The reader 23 reads the machining programs stored in the machining program storage unit 22 and sequentially executes program commands. The determination part 24 determines the auxiliary commands in the machining programs read by the reader 23 (determines whether or not the read program commands are the auxiliary commands indicating the unnecessity of receiving completion signals, which are stored in the auxiliary command storage unit 27). When the determination part 24 confirms the presence of the auxiliary commands in the machining programs, the auxiliary command transmitter 25 transmits signals requesting to execute auxiliary functions corresponding to the auxiliary commands. The completion signal receiver 26 receives the completion signals indicating the completion of the execution of the auxiliary functions.
When the determination part 24 determines that the program commands read by the reader 23 are the auxiliary commands, the auxiliary command transmitter 25 transmits signals requesting to execute the corresponding auxiliary functions. The completion signal receiver 26 executes the subsequent command without waiting to receive the completion signal, when the determination part 24 determines that the program commands read by the reader 23 are the auxiliary commands indicating the unnecessity of receiving the completion signals.
A process in which the auxiliary commands are executed by the numerical controller 21 is now described using a flowchart shown in FIG. 6.
The program commands in the machining programs are read (step SC01). It is determined whether the read program commands are the auxiliary commands or not (step S02). When the read program commands are the auxiliary commands, signals requesting to execute the auxiliary functions corresponding to the auxiliary commands are transmitted (step SC03). It is determined whether the completion signals are received or not (step S04). When the completion signals are received, the subsequent commands are executed. When the completion signals are not received, it is determined whether or not the read program commands are the auxiliary commands indicating the unnecessity of receiving the completion signals (step SC05). When the read program commands are the auxiliary commands indicating the unnecessity or receiving the completion signals, the subsequent commands are executed until the end of the machining programs without waiting to receive the completion signals (step SC06). The program execution time can be reduced by sequentially executing the subsequent commands without waiting to receive the completion signals.
The first, second, and third examples of prior art described above cannot confirm whether the auxiliary commands indicating the unnecessity of receiving the pre-registered completion signals are ended successfully or not. Therefore, when the auxiliary functions that have an impact on the machining are not ended successfully, the machining is continued without supply of machining fluid in, for example, the auxiliary functions in which the machining fluid needs to be supplied. As a result, defects are generated in the machined products. Consequently, the machining has to be started all over again, lowering the machining efficiency.